#include <stdio.h>


void bubble(int, int *);

int main(int argc, char *argv[]) {
  int i;
  int array[] = { 2, 1, 4, 3, 5, 8, 7, 6, 9, 0 };
  bubble(10, array);
  for (i = 0; i < 10; i++) {
    printf("%d ", array[i]);
  }
  printf("\n");

  return 0;
}

void bubble(int size, int *array) {
  int i, j, tmp;
  for (i = 0; i < size - 1; i++) {
    for (j = 0; j < size - i - 1; j++) {
      if (array[j] > array[j + 1]) {
        tmp = array[j];
        array[j] = array[j + 1];
        array[j + 1] = tmp;
      }
    }
  }
}
